<!--
 * @Author: wanglidong
 * @Date: 2021-04-08 09:23:01
 * @LastEditTime: 2022-03-28 09:00:51
 * @LastEditors: wanglidong
 * @Description:
 * @FilePath: \lowcode-front\src\views\measureBuild\other-other\projectLog\temporary-deposit-detail.vue
 * @nbsg
-->
<template>
  <div class="pre-archive-detail">
    <el-dialog width="85%" class="WholeScroll" style="padding: 0 35px;box-sizing: border-box;" :visible.sync="formShow" @close="handleClickDeal('cancel')" v-dialog-drag :modal-append-to-body="false" :close-on-click-modal="false" append-to-body>
      <span slot="title">
        <i class="iconfont icon-bianji"></i>
        <span class="formTitle">{{ title }}</span>
      </span>

      <div style="height: 690px; overflow-y: auto;">
        <el-form :model="formBaseData" ref="formBaseData" :rules="formBaseRules" style="position: relative">
          <div class="mRow">
            <div class="flex_between mb11">
              <div class="headTitle">基本信息</div>
              <div class="flex_align">
                <el-upload v-if="detailType !== 'check'" class="daochu mr10" action="" accept=".xls,.xlsx" :before-upload="submitImportExcel" :show-file-list="false">
                  <el-button id="excel-import-button" type="primary" size="small">
                    <img class="imgB" src="../../../assets/images/daochu.png" />
                    <div>导入</div>
                  </el-button>
                </el-upload>

                <div class="daochu">
                  <el-button type="primary" size="small" @click="downfile">
                    <i class="iconfont icon-a-xiazai1"></i>
                    <div>模板下载</div>
                  </el-button>
                </div>

                <div v-if="detailType == 'check'" class="daochu" style="margin-left: 10px;" @click="exportExcel">
                  <el-button type="primary" size="small">
                    <i class="iconfont icon-daochu"></i>
                    <div>导出</div>
                  </el-button>
                </div>
              </div>
            </div>

            <div class="card">
              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="公司" prop="company" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-select class="select" @change="fixQueryA()" value-key="id" v-model="formBaseData.company" placeholder="选择公司" style="width: 100%" clearable :disabled="detailType === 'check'">
                        <el-option v-for="item in projectTree" :key="item.id" :label="item.name" :value="item">
                        </el-option>
                      </el-select>
                    </el-col>
                  </el-form-item>
                </el-col>

                <el-col :span="6">
                  <el-form-item label="项目" prop="project" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-select class="select" v-on:change="fixQueryB()" style="width: 100%" value-key="id" v-model="formBaseData.project" placeholder="选择项目" clearable :disabled="detailType === 'check'">
                        <el-option v-for="item in formBaseData.company.children" :key="item.id" :label="item.name" :value="item">
                        </el-option>
                      </el-select>
                    </el-col>
                  </el-form-item>
                </el-col>

                <el-col :span="4">
                  <el-form-item label="日期" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-date-picker style="width: 100%;" size="small" v-model="formBaseData.logDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :disabled="detailType=='check'">
                      </el-date-picker>
                    </el-col>
                  </el-form-item>
                </el-col>

                <el-col :span="3">
                  <el-form-item label="星期" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-select style="width:100%;" value-key="value" v-model="formBaseData.week" placeholder="选择星期" clearable :disabled="detailType === 'check'">
                        <el-option v-for="item in weeklist" :key="item.id" :label="item.name" :value="item.value">
                        </el-option>
                      </el-select>
                    </el-col>
                  </el-form-item>
                </el-col>

                <el-col :span="3">
                  <el-form-item label="天气" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 100%;" size="small" v-model="formBaseData.weather" placeholder="请填写天气" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">工程进度</div>
            <table class="mytable" cellspacing="0" cellpadding="0" width="100%">
              <tr>
                <td class="wbg" :class="{'w11':index==8,'br1':index==progressVoLabel.length-1}" v-for="(item,index) in progressVoLabel" :key="'progressVoLabel'+index">
                  <div class="textW">{{item}}</div>
                </td>
              </tr>
              <tr v-for="(item,index) in formBaseData.progressVoList" :key="'progress'+index" v-if="index%2==0">
                <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                  <el-input size="small" v-model="formBaseData.progressVoList[index].dwProject" clearable :disabled="detailType=='check'"></el-input>
                </td>
                <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                  <div>
                    <el-input size="small" v-model="formBaseData.progressVoList[index].fbProject" clearable :disabled="detailType=='check'"></el-input>
                  </div>
                </td>
                <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                  <div>
                    <el-input size="small" v-model="formBaseData.progressVoList[index].fxProject" clearable :disabled="detailType=='check'"></el-input>
                  </div>
                </td>
                <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                  <div>
                    <el-input size="small" v-model="formBaseData.progressVoList[index].zfxProject" clearable :disabled="detailType=='check'"></el-input>
                  </div>
                </td>
                <template v-if="index+1<formBaseData.progressVoList.length">
                  <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                    <div>
                      <el-input size="small" v-model="formBaseData.progressVoList[index+1].dwProject" clearable :disabled="detailType=='check'"></el-input>
                    </div>
                  </td>
                  <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                    <div>
                      <el-input size="small" v-model="formBaseData.progressVoList[index+1].fbProject" clearable :disabled="detailType=='check'"></el-input>
                    </div>
                  </td>
                  <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2}">
                    <div>
                      <el-input size="small" v-model="formBaseData.progressVoList[index+1].fxProject" clearable :disabled="detailType=='check'"></el-input>
                    </div>
                  </td>
                  <td :class="{'bb1':detailType=='check'&&index==formBaseData.progressVoList.length-2,'br1':detailType=='check'}">
                    <div>
                      <el-input size="small" v-model="formBaseData.progressVoList[index+1].zfxProject" clearable :disabled="detailType=='check'"></el-input>
                    </div>
                  </td>
                </template>
                <template v-else>
                  <td v-for="(item,index) in 4" :key="'a'+index">
                    <div class="textW w1"></div>
                  </td>
                </template>
                <td v-if="detailType!='check'" class="br1">
                  <div class="textW flex_center">
                    <div class="delete flex_center" @click="onDelete('progressVoList',index)"><i class="iconfont icon-close"></i></div>
                  </div>
                </td>
              </tr>
              <tr v-if="detailType!=='check'">
                <td :colspan="9" class="bb1 br1">
                  <div class="textW btn" @click="onAdd('progressVoList')">+新增一行
                  </div>
                </td>
              </tr>
            </table>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">人员</div>
            <div class="card mb14">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-form-item label="施工单位管理人员" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.buildUnitManager" clearable onkeyup="value=value.replace(/[^\d^]+/g,'')" :disabled="detailType=='check'"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="监理单位人员" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.superiorPeople" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="6" class="flex_center">
                  <el-form-item label="安全员是否到岗" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.saferIsDuty" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="6" class="flex_center">
                  <el-form-item label="专职安全监理工程师到岗履职" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.superiorIsDuty" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-form-item label="特殊工种" label-position="top">
                  <el-col class="flex_align" style="padding-left:0;">
                    <el-input style="width: 255px;margin-right: 17px;" size="small" v-model="formBaseData.specialWorkKind" clearable :disabled="detailType=='check'"></el-input>
                    <el-input style="width: 130px;" size="small" v-model="formBaseData.specialWorkNum" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                  </el-col>
                </el-form-item>
              </el-row>
            </div>
            <table class="mytable" cellspacing="0" cellpadding="0" width="100%">
              <tr>
                <td class="wbg">
                  <div class="textW">名称</div>
                </td>
                <td class="wbg">
                  <div class="textW">人数</div>
                </td>
                <td :class="{'br1':detailType=='check'}" class="wbg">
                  <div class="textW">备注</div>
                </td>
                <td v-show="detailType!=='check'" class="w11 wbg br1">操作</td>
              </tr>
              <tr v-for="(item,index) in formBaseData.peopleInfoList">
                <td style="width:200px;" :class="{'bb1':detailType=='check'&&index==formBaseData.peopleInfoList.length-1}">
                  <el-input size="small" v-model="item.name" clearable :disabled="detailType=='check'"></el-input>
                </td>
                <td style="width:200px;" :class="{'bb1':detailType=='check'&&index==formBaseData.peopleInfoList.length-1}">
                  <el-input size="small" v-model="item.num" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"></el-input>
                </td>
                <td :class="{'bb1':detailType=='check'&&index==formBaseData.peopleInfoList.length-1,'br1':detailType=='check'}">
                  <el-input size="small" v-model="item.remark" clearable :disabled="detailType=='check'"></el-input>
                </td>
                <td v-if="detailType!='check'" class="br1">
                  <div class="textW flex_center">
                    <div class="delete flex_center" @click="onDelete('peopleInfoList',index)"><i class="iconfont icon-close"></i></div>
                  </div>
                </td>
              </tr>
              <tr v-if="detailType!=='check'">
                <td :colspan="8" class="bb1 br1">
                  <div class="textW btn" @click="onAdd('peopleInfoList')">+新增一行</div>
                </td>

              </tr>
            </table>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">机械</div>
            <div class="card one">
              <el-row :gutter="20">
                <el-col :span="5">
                  <el-form-item label="挖掘机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.digMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="铲土运输机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.transportMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="起重机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.weightMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="压实机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.compactionMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="其他工程机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.otherMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="5">
                  <el-form-item label="桩工机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.workMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="钢筋混凝土机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.steelMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="路面机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.roadMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="凿岩机械" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width: 130px;" size="small" v-model="formBaseData.drillingMachine" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">台</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">材料</div>
            <div class="card">
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="今日进场" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input size="small" v-model="formBaseData.dayIn" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="10" :offset="2">
                  <el-form-item label="今日进场已见证取样送检" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.dayInCheck" :disabled="detailType=='check'">
                        <el-radio label="是">合格</el-radio>
                        <el-radio label="否">不合格</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">工程作业面</div>
            <div class="card one">
              <el-row :gutter="20">
                <el-col :span="5">
                  <el-form-item label="路基" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.roadEnd" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="路面" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.road" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="桥梁" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.bridge" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="隧道" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.tunnel" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="机电" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.electric" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="5">
                  <el-form-item label="交安" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.safety" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="环保" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.environment" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="互通立交" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.interchange" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="5">
                  <el-form-item label="杂项" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input style="width:130px;" size="small" v-model="formBaseData.sundry" clearable :disabled="detailType=='check'" onkeyup="value=value.replace(/[^\d^]+/g,'')"><template slot="append">人</template></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">成本事宜</div>
            <div class="card">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-form-item label="成本预期控制目标" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.control" :disabled="detailType=='check'">
                        <el-radio label="是">满足</el-radio>
                        <el-radio label="否">不满足</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="18">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.costQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">安全事宜</div>
            <div class="card">
              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="安全隐患排除及时" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.safetyExclude" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="安全生产事故发生" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.safetyThing" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="事故处理及时" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.safetyDanger" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="24">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.safetyQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">进度事宜</div>
            <div class="card">
              <el-row :gutter="20">
                <el-col :span="7">
                  <el-form-item label="满足进度预期目标及符合项目总进度计划" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.progressPlan" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="12">
                  <el-form-item label="满足进度预期目标且符合总进度计划" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.progressTolPlan" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col> -->
                <el-col :span="17">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input size="small" type="textarea" :rows="2" v-model="formBaseData.progressQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
              <!-- <el-row>
                <el-col :span="24">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input size="small" type="textarea" :rows="2" v-model="formBaseData.progressQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row> -->
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">质量事宜</div>
            <div class="card">
              <el-row :gutter="20">
                <el-col :span="6">
                  <el-form-item label="满足相关的设计规范要求" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-radio-group v-model="formBaseData.qualityAsk" :disabled="detailType=='check'">
                        <el-radio label="是">是</el-radio>
                        <el-radio label="否">否</el-radio>
                      </el-radio-group>
                    </el-col>
                  </el-form-item>
                </el-col>
                <el-col :span="18">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.qualityQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">组织协调</div>
            <div class="card" style="padding: 11px 18px;">
              <el-row>
                <el-col :span="24">
                  <el-form-item label="尚待解决的问题" label-position="top">
                    <el-col style="padding-left:0;">
                      <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.organizationQuestion" clearable :disabled="detailType=='check'"></el-input>
                    </el-col>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">其它尚待解决问题</div>
            <div class="card" style="padding: 11px 18px;">
              <el-row>
                <el-col :span="24">
                  <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.otherQuestion" clearable :disabled="detailType=='check'"></el-input>
                </el-col>
              </el-row>
            </div>
          </div>

          <div class="mRow">
            <div class="mb11 headTitle">备注</div>
            <div class="card" style="padding: 11px 14px;">
              <el-row>
                <el-col :span="24">
                  <el-input class="" size="small" type="textarea" :rows="2" v-model="formBaseData.remark" clearable :disabled="detailType=='check'"></el-input>
                </el-col>
              </el-row>
            </div>
          </div>
          <div class="mRow">
            <div class="mb11 headTitle">附件</div>
            <div class="card" style="padding: 11px 14px;">
              <el-row>
                <el-col :span="19" style="position: relative">
                  <cmsUploadFile ref="fileOne" :detail-id="detailId" :fileSystem="fileSystem['one']" :disabled="detailType === 'check'" type="mul" :fileList="fileList" info="支持上传 png/jpg/gif/doc/xlsx/ppt/pdf等文件" :detail-type="detailType" />
                </el-col>
              </el-row>
            </div>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <template v-if="detailType === 'build' || detailType === 'edit'">
          <el-button size="small" type="primary" :loading="isLoading" @click="handleClickDeal('submit', { flag: 1 })">
            <i class="iconfont icon-icon_save"></i> 确 定
          </el-button>
        </template>
        <el-button size="small" @click="handleClickDeal('cancel')">
          <i class="iconfont icon-icon_cancel"></i> 取 消
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { importExcel } from '@/api/buss/frontProject'
import designChangeApply from "@/api/buss/designChangeApply";
import { doCreateObject } from "@/utils/publicFun";
import msgUtil from '@/utils/msgUtil'
export default {
  name: 'temporary-deposit-detail',
  components: {},
  props: {
    postDetail: {
      type: Object,
      default: {
        show: false,
        type: 'build',
        params: {}
      }
    }
  },
  watch: {
    postDetail(value) {
      console.log("type=", value.type)
      // 显示详情弹窗
      this.formShow = value.show
      // 初始化窗口参数
      this.activeName = 'first'
      // 详情类型
      this.detailType = value.type
      this.companyTree = [];
      this.projectTree = [];
      this.contsectTree = [];
      this.measurePhase = [];
      if (this.detailType == 'build') {
        this.title = '新增'
      } else if (this.detailType == 'check') {
        this.title = '查看项目详情'
        this.progressVoLabel = ['单位工程', '分部工程', '分项工程', '子分项工程', '单位工程', '分部工程', '分项工程', '子分项工程']
      } else if (this.detailType == 'edit') {
        this.title = '编辑'
      } else {
        this.title = ''
      }
      // 详情的流程操作处理
      this.detailActions.splice(0, this.detailActions.length)
      if (value.params) {
        for (let key in value.params.actions) {
          if (key !== 'show' && key !== 'update' && key !== 'getHistory') {
            this.$set(this.detailActions, this.detailActions.length, {
              name: value.params.actions[key].name,
              url: value.params.actions[key].url,
              key: key
            })
          }
        }
      }
      // 详情id
      this.detailId = value.params === undefined ? 0 : value.params.detailId
      if (this.detailType !== 'build') {
        this.fetchWorkSectionList(() => {
          this.getDetail()
        });
      } else {
        this.fetchWorkSectionList();
      }
      this.getAffiliationStage();
    }
  },
  data() {
    return {
      weeklist: [
        { name: '星期一', value: '一' },
        { name: '星期二', value: '二' },
        { name: '星期三', value: '三' },
        { name: '星期四', value: '四' },
        { name: '星期五', value: '五' },
        { name: '星期六', value: '六' },
        { name: '星期日', value: '日' }
      ],
      weatherlist: [
        { name: '晴', value: '晴' },
        { name: '阴', value: '阴' },
        { name: '雨', value: '雨' },
        { name: '雪', value: '雪' },
        { name: '其他', value: '其他' },
      ],
      dayInCheckRes: [
        { name: '合格', value: '合格' },
        { name: '不合格', value: '不合格' }
      ],
      controlRes: [
        { name: '满足', value: '满足' },
        { name: '不满足', value: '不满足' }
      ],
      yesOption: [
        { name: '是', value: '是' },
        { name: '否', value: '否' }
      ],
      safetyDangerOption: [
        { name: '及时', value: '及时' },
        { name: '无', value: '无' }
      ],
      companyTree: [],
      projectTree: [],
      contsectTree: [],
      measurePhase: [],
      isLoading: false,
      detailType: 'build', // 详情类型 build新建 check不可编辑查看 edit编辑
      detailId: '', // 当前详情的id
      detailActions: [], // 当前详情的操作项
      formShow: false, // 表单展示
      formlabelWidth: '130px', // 表单左侧标题宽度
      title: '',
      activeName: 'first',
      buildUnitTable: [
        {
          stuffName: '附件',
          part: 'partOne',
          file: [{ realName: '' }],
          isNeed: false,
          loading: false,
          isMulti: true
        }
      ],
      fileList: [],
      fileSystem: {
        'one': {
          sys: 'buss',
          module: 'projectLog',
          part: 'one',
          compoName: 'fileOne'
        },
      },
      selectList: {
        typeOptions: [
          {
            label: '项目类型',
            value: ''
          }
        ],
        regionOptions: [
          {
            label: '所属区域',
            value: ''
          }
        ],
        phaseOptions: [
          {
            label: '当前阶段',
            value: ''
          }
        ],
        companyList: [],
        //
        propertiesFieldOptions: [
          {
            label: '属性',
            value: ''
          }
        ],
        //
        file: []
      }, // 所有下拉框列表的集合
      progressVoLabel: ['单位工程', '分部工程', '分项工程', '子分项工程', '单位工程', '分部工程', '分项工程', '子分项工程', '操作'],
      formBaseData: {
        id: "",
        company: { children: [] },
        project: { children: [] },
        buildCompanyId: '',
        companyId: '',
        projectId: '',
        content: '',
        fileName: '',
        fileCode: '',
        sendTime: '',
        measurePhaseId: '',
        // 新增
        projectName: '',
        logDate: '',
        week: '',
        weatherOther: '',
        progressVoList: [
          {
            isChecked: false,
            dwProject: '',
            fbProject: '',
            fxProject: '',
            zfxProject: ''
          },
          {
            isChecked: false,
            dwProject: '',
            fbProject: '',
            fxProject: '',
            zfxProject: ''
          }
        ],
        buildUnitManager: '',
        superiorPeople: '',
        saferIsDuty: '',
        superiorIsDuty: '',
        peopleInfoList: [
          { name: '', num: '', remark: '' },
        ],
        specialWorkKind: '',
        specialWorkNum: '',
        digMachine: '',
        transportMachine: '',
        weightMachine: '',
        compactionMachine: '',
        workMachine: '',
        steelMachine: '',
        roadMachine: '',
        drillingMachine: '',
        otherMachine: '',
        dayIn: '',
        dayInCheck: '',
        roadEnd: '',
        road: '',
        bridge: '',
        tunnel: '',
        electric: '',
        safety: '',
        environment: '',
        interchange: '',
        sundry: '',
        control: '',
        costQuestion: '',
        safetyExclude: '',
        safetyThing: '',
        safetyDanger: '',
        safetyQuestion: '',
        progressPlan: '',
        progressTolPlan: '',
        progressQuestion: '',
        qualityAsk: '',
        qualityQuestion: '',
        organizationQuestion: '',
        remark: ''
      }, // 表单基本信息内容
      formBaseRules: {
        company: [
          {
            required: true,
            message: '请选择公司',
            trigger: 'change'
          }
        ],
        project: [
          {
            required: true,
            message: '请选择项目',
            trigger: 'change'
          }
        ],
        // itemName: [
        //   { required: true, message: '请输入事项名称', trigger: 'blur' },
        // ],
        // affiliationStage: [
        //   { required: true, message: '请选择项目阶段', trigger: 'blur' },
        // ],
        // markTime: [
        //   { required: true, message: '请选择日期', trigger: 'blur' },
        // ],
      }, // 表单基本信息验证
    }
  },
  methods: {
    exportExcel() {
      this.$httpPost('/buss/projectLog/exportExcel', { id: this.detailId, }, { responseType: 'blob' }).then(res => {
        doCreateObject(res, '项目日志.xls')
      }).catch(e => {
        console.log(e);
      })
    },
    onAdd(str) {
      if (str == 'progressVoList') {
        let data = { dwProject: '', fbProject: '', fxProject: '', zfxProject: '' }
        this.formBaseData.progressVoList.push(data, JSON.parse(JSON.stringify(data)))
      } else if (str == 'peopleInfoList') {
        this.formBaseData.peopleInfoList.push({ name: '', num: '', remark: '' })
      }
    },
    onDelete(str, index) {
      if (str == 'progressVoList') {
        let arr = this.formBaseData[str].filter((e, i) => i !== index && i !== index + 1)
        this.formBaseData[str] = arr
      } else if (str == 'peopleInfoList') {
        this.formBaseData[str].splice(index, 1)
      }
    },
    //  提交excel导入文件选择
    submitImportExcel(file) {
      let projectLogId = this.formBaseData.id
      let fd = new FormData()
      fd.append('file', file)
      fd.append('Content-Type', 'multipart/form-data; boundary=----WebKitFormBoundaryIOi8qEBAFV1KN25n')
      this.$httpPost(`/buss/projectLog/importExcel`, fd, {
        headers: {
          'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryIOi8qEBAFV1KN25n',
        }
      }).then(res => {
        if (res.code === 200) {
          this.$message.success("导入成功")
          this.formBaseData = JSON.parse(JSON.stringify(res.data));
          if (!this.formBaseData.id){
            this.formBaseData.id = projectLogId;
          }
          //  还原项目选择项
          if (this.formBaseData.companyId) {
            //防止公司id没有导致报错
            this.projectTree.forEach(sel => {
              if (sel.id == this.formBaseData.companyId) {
                this.$set(this.formBaseData, 'company', sel)
              }
            })
            //  还原项目选择项
            if (this.formBaseData.company && this.formBaseData.company.hasOwnProperty('children')) {
              this.formBaseData.company.children.forEach(sel => {
                if (sel.id == this.formBaseData.projectId) {
                  this.$set(this.formBaseData, 'project', sel)
                }
              })
            }
          } else {
            this.$set(this.formBaseData, 'company', '')
            this.$set(this.formBaseData, 'project', '')
            this.$set(this.formBaseData, 'companyId', '')
            this.$set(this.formBaseData, 'projectId', '')
          }
        } else {
          this.$messageError("请求导入excel失败:" + res.data.message)
        }
      }).catch(e => {
        console.log(e);
        //this.$messageError("请求导入excel失败")
      })
    },

    //  下载模板
    downfile() {
      this.$httpPost(`/buss/projectLog/downfile`,
        this.search, { responseType: 'blob' }).then(res => {
          doCreateObject(res, '项目日志导入模板.xlsx');
        }).catch(e => {
          console.log(e);
          this.$messageError("请求excel模板失败")
        })
    },
    /**
     * 修正查询参数并查询
     *
     * */
    fixQueryA() {
      if (this.formBaseData.company.children && this.formBaseData.company.children.length) {
        this.formBaseData.project = this.formBaseData.company.children[0]
      } else {
        this.formBaseData.project = {}
      }
      this.fixQueryB()
    },
    fixQueryB() {
      this.formBaseData.projectName = this.formBaseData.project.name
      if (this.formBaseData.project.children && this.formBaseData.project.children.length) {
        this.formBaseData.section = this.formBaseData.project.children[0]
      } else {
        this.formBaseData.section = {}
      }
      this.fixQueryC()
    },
    fixQueryC() {
      if (this.formBaseData.section.children && this.formBaseData.section.children.length) {
        this.formBaseData.measurePhaseId = this.formBaseData.section.children[0].id
      } else {
        this.formBaseData.measurePhaseId = ''
      }
    },
    blurInputEvent(value) {
      if (value) {
        value.target.value = Number(value.target.value).toFixed(2)
      }
    },
    /**
     * 获取工程类合同-施工列表
     */
    fetchWorkSectionList(callback) {
      let url = '/buss/measurephaseMaster/getMeasurePhaseTree'
      if (this.detailType == 'check') {
        url = '/buss/measurephaseMaster/getMeasurePhaseTree'
      }
      this.$httpGet(url).then(res => {
        if (res.code == 200) {
          this.projectTree = res.data
          if (callback) callback()
        } else {
          console.log(res.data.message)
          this.$messageError(res.data.message)
        }
      }).catch(e => {
        console.log(e)
        this.$messageError('请求获取工程类合同-施工列表失败')
      })
    },

    // 获取详情请求 api
    getDetail() {
      this.$httpGet(`/buss/projectLog/getOne?id=${this.detailId}`, {}).then(async (res) => {
        if (res.status === 1) {
          this.formBaseData = res.data
          // 初始化工程进度
          if (this.formBaseData.progressVoList.length == 0) {
            this.formBaseData.progressVoList = [
              {
                dwProject: '',
                fbProject: '',
                fxProject: '',
                zfxProject: ''
              },
              {
                dwProject: '',
                fbProject: '',
                fxProject: '',
                zfxProject: ''
              }
            ]
          }
          // 初始化人员
          if (this.formBaseData.peopleInfoList.length == 0) {
            this.formBaseData.peopleInfoList = [{ name: '', num: '', remark: '' }]
          }
          //  还原项目选择项
          this.projectTree.forEach(sel => {
            if (sel.id == this.formBaseData.companyId) {
              this.$set(this.formBaseData, 'company', sel)
            }
          })
          //  还原项目选择项
          this.formBaseData.company.children.forEach(sel => {
            if (sel.id == this.formBaseData.projectId) {
              this.$set(this.formBaseData, 'project', sel)
            }
          })
          //  还原标段选择项
          /*this.formBaseData.project.children.forEach(sel => {
            if (sel.id == this.formBaseData.sectionId) {
              this.formBaseData.section = sel
            }
          })*/
          // 文件系统
          // this.$refs.cmsFileTable.getFiles()
          this.$forceUpdate()
          this.loadFiles()
        } else {
          this.$messageError(res.message)
        }
      })
        .catch((res) => {
          console.log('请求出现错误', res)
          this.$messageError(this.$route.name + '获取详情请求-请求失败')
        })
    },

    // 提交详情 提交1/暂存0 新建0/修改1
    submitDetail(type, callback) {
      let submit = '/buss/projectLog/submit'
      if (this.detailType === 'build') {
        submit = '/buss/projectLog/submit'
      } else {
        submit = '/buss/projectLog/resubmit'
      }
      this.formBaseData.projectId = this.formBaseData.project.id
      this.formBaseData.buildCompanyId = this.formBaseData.company.id
      this.formBaseData.companyId = this.formBaseData.company.id
      this.$httpPost(
        submit,
        this.formBaseData
      ).then((res) => {
        if (res.status === 1) {
          this.$messageSuccess('保存成功')
          this.detailId = !this.detailId ? res.data.id : this.detailId
          this.isLoading = false
          if (callback) callback()
        } else {
          this.isLoading = false
          if (res.msg) {
            this.$messageError(res.message)
          } else {
            this.$messageError(this.$route.name + '提交详情-请求失败')
          }
        }
      }).catch((res) => {
        console.log('请求出现错误', res)
        this.isLoading = false
        if (res.msg) {
          this.$messageError(res.message)
        } else {
          this.$messageError(this.$route.name + '提交详情-请求失败')
        }
      })
    },
    // 事件处理的api请求
    sealDealHttp(url, query, params, callback) {
      this.$httpPost(url + query, params)
        .then((res) => {
          if (res.data.status === 1) {
            if (callback) callback(res.data)
          } else {
            this.$messageError(res.data.message)
          }
        })
        .catch((res) => {
          console.log('请求出现错误', res)
          console.log(res)
        })
    },
    // 点击各个流程的按钮事件
    handleClickDeal(type, res) {
      switch (type) {
        // 取消，关闭窗口
        case 'cancel':
          // 重置表单验证
          console.log(this.activeName)
          // if (this.activeName == 'first') {
          //   if (this.$refs['formBaseData'] !== undefined) {
          //     this.$refs['formBaseData'].resetFields()
          //   }
          // }
          this.progressVoLabel = ['单位工程', '分部工程', '分项工程', '子分项工程', '单位工程', '分部工程', '分项工程', '子分项工程', '操作']
          this.$refs['formBaseData'].resetFields()
          this.formBaseData = {
            buildCompanyId: '',
            projectId: "",
            affiliationStage: '',
            markTime: '',
            content: '',
            fileName: '',
            fileCode: '',
            sendTime: '',
            company: { children: [] },
            project: { children: [] },
            // 新增部分
            projectName: '',
            logDate: '',
            week: '',
            weatherOther: '',
            progressVoList: [
              {
                dwProject: '',
                fbProject: '',
                fxProject: '',
                zfxProject: ''
              },
              {
                dwProject: '',
                fbProject: '',
                fxProject: '',
                zfxProject: ''
              }
            ],
            buildUnitManager: '',
            superiorPeople: '',
            saferIsDuty: '',
            superiorIsDuty: '',
            peopleInfoList: [
              { name: '', num: '', remark: '' },
            ],
            specialWorkKind: '',
            specialWorkNum: '',
            digMachine: '',
            transportMachine: '',
            weightMachine: '',
            compactionMachine: '',
            workMachine: '',
            steelMachine: '',
            roadMachine: '',
            drillingMachine: '',
            otherMachine: '',
            dayIn: '',
            dayInCheck: '',
            roadEnd: '',
            road: '',
            bridge: '',
            tunnel: '',
            electric: '',
            safety: '',
            environment: '',
            interchange: '',
            sundry: '',
            control: '',
            costQuestion: '',
            safetyExclude: '',
            safetyThing: '',
            safetyDanger: '',
            safetyQuestion: '',
            progressPlan: '',
            progressTolPlan: '',
            progressQuestion: '',
            qualityAsk: '',
            qualityQuestion: '',
            organizationQuestion: '',
            remark: ''
          }
          this.buildUnitTable = [
            {
              stuffName: '附件',
              part: 'partOne',
              file: [{ realName: '' }],
              isNeed: false,
              loading: false,
              isMulti: true
            }
          ]
          // 清空文件
          this.selectList.file = []
          // 清空文件
          this.fileList = []
          for (let k in this.fileSystem) {
            let fileProp = this.fileSystem[k]
            this.$refs[fileProp.compoName].cancelAll()
          }
          // 清空文件
          // 关闭弹窗
          this.formShow = false
          break
        // 保存
        case 'submit':
          let flag = res.flag
          // 表单验证
          this.$refs['formBaseData'].validate((valid) => {
            if (valid) {
              // 再验证其他内容
              this.formBaseData.companyId = this.formBaseData.company.id
              this.formBaseData.projectId = this.formBaseData.project.id
              // 整理文件信息
              this.isLoading = true
              // 提交详情
              this.submitDetail(flag, () => {
                // 绑定文件到表单
                // this.$refs.cmsFileTable.bindAllFile(this.detailId)
                this.formShow = false
                this.isLoading = false
                this.saveFiles()
                setTimeout(() => {
                  // 传值给父组件刷新列表
                  this.$emit('reloadList')
                  this.$bus.$emit('Ajax')
                }, 1500)
              })
            } else {
              this.isLoading = false
            }
          })
          break
        // 删除
        case 'delete':
          this.$prompt('删除理由', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消'
          })
            .then(({ value }) => {
              if (value === null || value === '') {
                this.$messageError('请填写删除理由后重试')
                return
              }
              this.sealDealHttp(
                res.url,
                ``,
                {
                  id: this.detailId,
                  description: value
                },
                () => {
                  this.$messageSuccess('删除成功!')
                  this.formShow = false
                  // 传值给父组件刷新列表
                  this.$emit('reloadList')
                  this.$bus.$emit('Ajax')
                }
              )
            })
            .catch(() => { })
          console.log('请求出现错误')
          break
      }
    },
    /**
     *显示删除按钮
     * @param row
     */
    buttonDelShow(row) {
      let flag = false
      if (
        (this.detailType === 'build' || this.detailType === 'edit') &&
        row.file[0].realName !== '' &&
        !row.isNeed
      ) {
        flag = true
      }
      // 多文件上传的控制的控制
      if (row.isMulti) {
        flag = false
      }
      return flag
    },


    //所属阶段
    getAffiliationStage() {
      this.$httpPost('/buss/projectLog/affiliationStage')
        .then(res => {
          if (res.status === 1) {
            console.log('我获取了阶段')
            this.selectList.affiliationStageList = res.data
          } else {
            this.$messageError(res.data.message)
          }
        })
        .catch(res => {
          this.$messageError('contractType请求失败')
        })
    },
    /**
     *控制显示暂无文件
     * @param row
     */
    showNone(row) {
      let flag = false
      if (
        this.detailType !== 'build' &&
        this.detailType !== 'edit' &&
        row.file[0].realName === ''
      ) {
        flag = true
      }
      // 经办人操作时
      // if ((this.detailType!=='build'&&this.detailType!=='edit'&&this.detailType!=='check')&&this.isReport) {
      //   flag=false
      // }
      return flag
    },
    /**
     * 控制查看按钮显示
     * @param row
     */
    buttonCheckShow(row) {
      let flag = false
      if (
        this.detailType !== 'build' &&
        this.detailType !== 'edit' &&
        row.file[0].realName !== ''
      ) {
        flag = true
      }
      // 经办人操作时
      // if ((this.detailType!=='build'&&this.detailType!=='edit'&&this.detailType!=='check')&&this.isReport) {
      //   flag=false
      // }
      // 多文件上传的控制的控制
      if (row.isMulti) {
        flag = false
      }
      return flag
    },
    /**
     * 控制上传按钮显示
     * @param row
     * @returns {boolean}
     */
    buttonUploadShow(row) {
      let flag = false
      if (this.detailType === 'build' || this.detailType === 'edit') {
        flag = true
      }
      // 经办人操作时
      // if ((this.detailType!=='build'&&this.detailType!=='edit'&&this.detailType!=='check')&&this.isReport) {
      //   flag=true
      // }
      return flag
    },
    tableChange(val) {
      this.$set(this, 'buildUnitTable', [...val])
    },
    // 点击单元格
    cellClick(row, column, cell, event) {
      // console.log(row, column, cell, event)
      console.log(column)
      if (column.property === 'projectName') {
        this.handleClickDeal({
          type: 'show',
          detailId: row.id,
          actions: row.actions
        })
      }
    },
    saveFiles() {
      for (let k in this.fileSystem) {
        let fileProp = this.fileSystem[k]
        this.$refs[fileProp.compoName].saveAll(this.detailId)
      }
    },
    loadFiles() {
      this.$nextTick(() => {
        for (let k in this.fileSystem) {
          let fileProp = this.fileSystem[k]
          this.$refs[fileProp.compoName].init()
        }
      })
    },

  }
}
</script>

<style scoped lang="scss">
.WholeScroll {
  ::v-deep .el-dialog__body {
    padding-top: 0 !important;
    padding-left: 35px !important;
    padding-right: 35px !important;
  }
}
.icon-bianji {
  font-size: 16px;
  color: #151515;
}
.formTitle {
  font-weight: bold;
  font-size: 16px;
  color: #151515;
}
.contract-ele {
  width: 100%;
}
.contract-ele-long {
  //   width: 280px;
  width: 98%;
}

.el-input .el-select {
  width: 130px;
}

.hoverTxt {
  color: #008fe0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greenButton {
  padding: 9px 15px;
}

.flex_align {
  display: flex;
  align-items: center;
}
.flex_between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex_center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex_1 {
  flex: 1;
}

.headTitle {
  font-size: 14px;
  font-weight: bold;
  color: #061f3c;
  margin-left: 4px;
}
.daochu {
  .imgB {
    width: 14px;
    height: 15px;
    margin-right: 4px;
    display: inline-block;
  }
  .el-button--primary {
    background-color: #0076ff;
    height: 36px;
  }
  .icon-a-xiazai1 {
    font-size: 20px;
    margin-right: 4px;
    margin-top: -2px;
  }
  .icon-daochu {
    margin-right: 4px;
  }
  ::v-deep {
    .el-button--small {
      padding: 9px 21px;
    }
    .el-button span {
      display: flex;
      align-items: center;
    }
  }
}
.mRow {
  padding: 27px 0 0;
}
.mr10 {
  margin-right: 10px;
}
.mb11 {
  margin-bottom: 11px;
}
.mb14 {
  margin-bottom: 14px;
}
.card {
  background-color: #f6f7f9;
  border-radius: 4px 4px 4px 4px;
  padding: 25px;
}
.one {
  .el-col-5 {
    width: 20% !important;
  }
}

table tr td {
  border-top: 1px solid #dedede;
  border-left: 1px solid #dedede;
}
.mytable {
  width: 100%;
  .wbg {
    background-color: #f6f7f9;
    color: #061f3c;
  }
  .w11 {
    width: 80px;
    background-color: #f6f7f9;
    color: #061f3c;
  }
  .delete {
    width: 24px;
    height: 24px;
    background-color: #ffe6de;
    color: #dd3434;
    font-size: 12px;
    line-height: 1;
    border: 1px solid #dc626b;
    cursor: pointer;
    .icon-close {
      font-size: 12px;
    }
  }
  .w25 {
    width: calc(25% - 2px);
  }
  .textW {
    font-size: 14px;
    color: #606266;
    text-align: center;
    padding: 10px 15px;
    box-sizing: border-box;
  }
  .w1 {
    min-width: 150px;
  }
  .wH100 {
    width: 100px;
  }
  .textL {
    text-align: left;
  }
  .mr15 {
    margin-right: 15px;
  }
  .btn {
    background-color: rgba(49, 108, 226, 0.1);
    color: #3c8ded;
    padding: 12px 15px;
    cursor: pointer;
  }
  .btn_red {
    background-color: #f9dcdc;
    color: #dd3434;
    padding: 12px 15px;
    cursor: pointer;
  }
  .br1 {
    border-right: 1px solid #dedede;
  }
  .bb1 {
    border-bottom: 1px solid #dedede;
  }
  .ischeck {
    background-color: #f9dcdc;
    ::v-deep .el-input__inner {
      background-color: #f9dcdc;
    }
  }
  ::v-deep {
    .el-input__inner {
      border-radius: 0;
      border-color: transparent;
    }
    .el-input__inner:focus {
      border-color: #3c8ded;
    }
    .el-checkbox__input.is-checked .el-checkbox__inner {
      background-color: #dd3434;
      border-color: #dd3434;
    }
    .el-checkbox__inner:hover {
      border-color: #dd3434;
    }
  }
}
::v-deep {
  .el-input.is-disabled .el-input__inner,
  .el-radio__input.is-disabled .el-radio__inner,
  .el-textarea.is-disabled .el-textarea__inner {
    background-color: white;
  }
  .el-radio__input.is-disabled + span.el-radio__label {
    color: #606266;
  }
  .el-radio {
    margin-right: 30px;
  }
  .el-radio__label {
    padding-left: 10px;
    font-size: 14px;
  }
}
</style>
